import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _DataSet from "choerodon-ui/pro/lib/data-set";
import React, { createContext, useMemo } from 'react';
import SearchListDataSet from "./SearchListDataSet";
var Store = createContext();
export default Store;
export var StoreProvider = function StoreProvider(props) {
  var children = props.children,
      searchCode = props.searchCode;
  var listDataSet = useMemo(function () {
    return new _DataSet(SearchListDataSet({
      searchCode: searchCode
    }));
  }, []);

  var value = _objectSpread(_objectSpread({}, props), {}, {
    listDataSet: listDataSet
  });

  return /*#__PURE__*/React.createElement(Store.Provider, {
    value: value
  }, children);
};